home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
source
/
vr386
/
octball.plg
< prev
next >
Wrap
Text File
|
1993-04-18
|
2KB
|
89 lines
# an octagonal ball visible from the outside, 1000x1000
octball 32 26
# vertices:
# X Y Z
# front middle ring
-190 -460 -190 # vertex 0
190 -460 -190 # vertex 1
460 -190 -190 # vertex 2
460 190 -190 # vertex 3
190 460 -190 # vertex 4
-190 460 -190 # vertex 5
-460 190 -190 # vertex 6
-460 -190 -190 # vertex 7
# rear middle ring
-190 -460 190 # vertex 8
190 -460 190 # vertex 9
460 -190 190 # vertex 10
460 190 190 # vertex 11
190 460 190 # vertex 12
-190 460 190 # vertex 13
-460 190 190 # vertex 14
-460 -190 190 # vertex 15
# front face
-85 -192 -460 # vertex 16
85 -192 -460 # vertex 17
192 -85 -460 # vertex 18
192 85 -460 # vertex 19
85 192 -460 # vertex 20
-85 192 -460 # vertex 21
-192 85 -460 # vertex 22
-192 -85 -460 # vertex 23
# back face
-85 -192 460 # vertex 24
85 -192 460 # vertex 25
192 -85 460 # vertex 26
192 85 460 # vertex 27
85 192 460 # vertex 28
-85 192 460 # vertex 29
-192 85 460 # vertex 30
-192 -85 460 # vertex 31
# polygons: all cosine-lit, assorted colors
# color #verts vert1 vert2 ...
0x11ff 8 16 17 18 19 20 21 22 23 # front face: counterclockwise
0x12ff 8 31 30 29 28 27 26 25 24 # back face: clockwise
# middle ring of polys: same as the octagonal cylinder
# these faces are facing us in the sketch, thus are CCW
0x13ff 4 5 4 12 13 # top
0x14ff 4 4 3 11 12
0x15ff 4 3 2 10 11 # right side
0x16ff 4 2 1 9 10
# these faces are away from us in the sketch, and thus CW
0x17ff 4 8 9 1 0 # bottom
0x18ff 4 15 8 0 7
0x19ff 4 14 15 7 6 # left side
0x1aff 4 13 14 6 5
# Now we need to create the end poly rings. We can simply use
# the polys above, changing the vertex numbers because we kept
# the rings of vertexes together
# frontmost ring: vertices 0..7 -> 16..23, 8..15 -> 0..7
0x13ff 4 21 20 4 5 # top
0x14ff 4 20 19 3 4
0x15ff 4 19 18 2 3 # right side
0x16ff 4 18 17 1 2
0x17ff 4 0 1 17 16 # bottom
0x18ff 4 7 0 16 23
0x19ff 4 6 7 23 22 # left side
0x1aff 4 5 6 22 21
# rearmost ring: vertices 8..15 -> 24..31, 0..7 -> 8..15
0x13ff 4 13 12 28 29 # top
0x14ff 4 12 11 27 28
0x15ff 4 11 10 26 27 # right side
0x16ff 4 10 9 25 26
0x17ff 4 24 25 9 8 # bottom
0x18ff 4 31 24 8 15
0x19ff 4 30 31 15 14 # left side
0x1aff 4 29 30 14 13